/*
* $Id: DrawControl.h 111 2010-07-01 15:26:44Z volok-aleksej@yandex.ru $
*
* Copyright 2009 by Volokitin Alexey
* All rights reserved
*
*/
#ifndef _DRAW_CONTROL_H_
#define _DRAW_CONTROL_H_

class CKeyProcess;

class CDrawControl
{
protected:
	bool m_bActive;
	CRect m_rect;
	std::tstring m_strValue;
	std::vector<CKeyProcess*> m_aKeyProcess;
protected:
	virtual void Resize() = 0;
	virtual void PaintActive(CDC* dc) = 0;
	virtual void PaintNonActive(CDC* dc) = 0;
public:
	CDrawControl(const std::tstring& strName = _T(""));
	virtual ~CDrawControl();
public:
	void SetActive(bool bActive);
public:
	virtual void SetPos(CPoint pos);
	virtual void SetCx(int cx);
	virtual void SetCy(int cy);
	virtual int GetSizeY();
	CRect GetRect();
public:
	virtual void Paint(CDC* dc);
	virtual bool ProcessKey(unsigned int nChar, byte stateSysKey);
	virtual bool ProcessMouse(unsigned int nChar, CPoint pos, int param);
	virtual std::tstring GetValue();
};

#endif/*_DRAW_CONTROL_H_*/